ci: harden releases against branch/tag name collisions#432
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo GitHub Actions workflows are added/modified: a new collision detection workflow checks for naming conflicts between branches and tags on main/dev branches, while the release workflow now synchronizes remote tags before running semantic-release to prevent stale tag issues. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Defense-in-depth follow-up to #427 (rolling dev tag rename). Two additions so the same shape of bug — a tag name colliding with a branch name, which made
git fetch --tagsfail and silently blocked every versioned release onmain— can't silently recur.release.yml: rungit fetch --tags --force --prune --prune-tags originbeforesemantic-release. semantic-release itself runsgit fetch --tagsunconditionally and aborts on any "would clobber existing tag" conflict, so force-pruning up front means a stray colliding tag recovers instead of blocking the release.ref-collision-check.yml(new): runs on push tomain/dev, fails CI if any branch and tag share a name. Loud early signal instead of a silently-missing GitHub Release.Neither change touches
dev-release.yml— #427 already fixed the original collision by renaming the rolling tag todev-latest, andv1.6.0cut cleanly on 2026-04-13 with the tarball attached.Test plan
Ref Collision Checkjob runs green ondevandmaindev→mainmerge, confirmAnalyze & Releasecompletesgit fetch --tags --forceand cuts a new versioned releasedevto a scratch branch; confirmRef Collision Checkfails with the offending nameSummary by CodeRabbit